/**
 * 
 */
package cn.edu.bjtu.workbench.mvc.ee;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import cn.edu.bjtu.workbench.configuration.TextCategorizationCNNConfig;
import cn.edu.bjtu.workbench.model.TextCategorizationCNNModel;

/**
 * @author alex
 *
 */
@WebListener
public class StartListener implements ServletContextListener{

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		//这简单一句就会让模型加载.而且这个加载是在项目启动的过程中
		TextCategorizationCNNModel.get().restoreFromFile();
		TextCategorizationCNNConfig.get();
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		
	}

}
